extends CharacterBody2D
var player = null


func _on_area_2d_body_entered(body: Node2D) -> void:
	if body.name == "Player":
		player = body

func _process(delta: float) -> void:
	if player != null:
		player.get_hurt()


func _on_area_2d_body_exited(body: Node2D) -> void:
	if body.name == "Player":
		player = null
